<?php
/**
 * Created by PhpStorm.
 * User: danny
 * Date: 2017/3/9
 * Time: 上午11:11
 */

namespace App\Http\Service;


use App\Components\CebApiRequest;
use App\Constants\CebApi;

class BehaviorService {
    public static function behaviorList(){
        $arr_Category = static::behaviorCategoryList();
        $ret = [];
        foreach($arr_Category as $map_Category){
            $ret = array_merge($ret,$map_Category['behavior_list']);
        }
        return $ret;
    }

    public static function behaviorCategoryList(){
        $request = new CebApiRequest();
        $res = $request->invoke(CebApi::BEHAVIOR_LIST,[]);
        return !empty($res->data('category_list'))?$res->data('category_list'):[];
    }
}